# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-capturer
pkgver=3.0
pkgrel=4
pkgdesc="Easily capture stdout/stderr of the current process and subprocesses"
url="https://capturer.readthedocs.io/en/latest/"
arch="noarch"
license="MIT"
# has circular dependency with py3-humanfriendly so tests fail
options="!check"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/c/capturer/capturer-$pkgver.tar.gz"
builddir="$srcdir/capturer-$pkgver"

build() {
	python3 setup.py build
}

check() {
	pytest capturer/tests.py
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
	find "$pkgdir" -name "*tests*" -delete
}

sha512sums="
3c83c0eade27380304347bdc93df392b2cb84c084e50693993dcca5fd572b8f92d31de43b4a2ddd0a0e8c7eb097629127e86a4860918c507d13b0e2979a04098  capturer-3.0.tar.gz
"
